<template>
  <div class="loader-container">
  <div class="loader-child"></div>
  <div class="loader-child"></div>
  <div class="loader-child"></div>
</div>
</template>

<script setup lang='ts'>
import { ref } from "vue"
</script>

<style lang="scss" scoped>
.loader-container {
  width: 100px;
  height: 100px;
  perspective: 780px;
  position: relative;
}

.loader-child {
  position: absolute;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border-radius: 50%;

  &:nth-of-type(1) {
    left: 0%;
    top: 0%;
    animation: rotate-one 1.15s linear infinite;
    border-bottom: 6px solid #5c5edc;
  }
  &:nth-of-type(2) {
    right: 0%;
    top: 0%;
    animation: rotate-two 1.15s linear infinite;
    border-right: 6px solid #9e85c3;
  }
  &:nth-of-type(3) {
    right: 0%;
    bottom: 0%;
    animation: rotate-three 1.15s linear infinite;
    border-top: 6px solid #e9908a;
  }
}

@keyframes rotate-one {
  0% {
    transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg);
  }
}

@keyframes rotate-two {
  0% {
    transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg);
  }
}

@keyframes rotate-three {
  0% {
    transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg);
  }
}
</style>
